1. Field of the Invention
The present invention relates to rotation-angle detecting apparatuses, and particularly, but not exclusively, to a rotation-angle detecting apparatus having a plurality of detection units.
2. Description of the Related Art
Japanese Patent Laid-Open No. 6-102055 describes a rotation-angle detecting apparatus for detecting a rotation angle by detecting changes in scales mounted on a rotating shaft. In the rotation-angle detecting apparatus, a plurality of detection units (rotary encoders) are arranged around the rotating shaft at positions facing the scales and the results obtained by the individual detection units are averaged, thereby reducing the effect of eccentricity of the rotating axis.
In order to process signals from two detection units to obtain a rotation angle and to perform digital signal processing using a digital signal processor, computing is performed at successive predetermined time intervals. If the period of the periodic signals from the detection units is shorter than the predetermined time interval, not all the information can be obtained simply by obtaining discrete digital values converted from the periodic signals. That is, if the period of the periodic signals is shorter than the predetermined time interval, it is impossible to determine the number of cycles within the predetermined time interval.
In order to compensate for this problem, detection signals are binarized (i.e. converted to a signal having one of two discrete values, the value changing when the signal crosses zero, which happens twice during each period for a sinusoidal signal) and the cycles are counted using a counter that is different from the digital signal processor. The counter can count all the cycles regardless of the time interval in digital signal processing. The digital signal processor obtains the count result at the predetermined time intervals so that no information will be lost. In known methods, periodic signals to be divided must remain as analog signals, which should then be binarized so that the cycles can be counted.
There are two known methods, which will be described below, for obtaining a rotation angle from signals of two detection units.
The first method is a method of generating an averaged pair of periodic signals by combining two pairs of periodic signals using a hardware component, such as an analog multiplier, and, thereafter, performing the normal processing.
FIG. 9 is a diagram showing circuits for performing this processing. The following processing calculations are performed on two pairs of periodic signals (Ca and Sa) and (Cb and Sb) one pair from each of two detection units, using multiplier circuits, an adder circuit, and a subtractor circuit, thereby obtaining periodic signals C and S:S=Sa*Cb+Ca*Sb C=Ca*Cb−Sa*Sb   (1)Such each pair of signals having a 90 degree phase difference can be produced from a single scale.
FIG. 10 shows the relationship between the periodic signals before and after the processing. The cycle of the obtained periodic signals C and S is half the cycle of the original periodic signals before the processing, and the phases are averaged. Since the periodic signals C and S are averaged as analog signals, the processing from this point onward regards the periodic signals C and S as normal signals, and known processing can be performed, as described next.
Using normal processing, the periodic signals C and S are converted to digital signals, which in turn are divided. The periodic signals C and S are binarized using a zero-crossing circuit, and counting processing is performed. From these two pieces of information, rotation-angle information is generated.
The second method is a method of individually performing analog-to-digital conversion and counting of two pairs of signals, performing independent processing using a digital signal processor, and obtaining an average.
In the first known method, averaging is performed using analog signals. Thus, processing using hardware components shown in FIG. 9, that is, analog multiplication, addition, and subtraction, must be performed.
In the second known method, division processing is performed by performing two divisions for each signal using the digital signal processor. Thus, the processing time becomes long.
This is because, in order to divide periodic signals using digital signal processing techniques, the ratio between analog-to-digital-converted values of the two periodic signals must be calculated. The ratio is obtained by calculating a division. In general, divisions calculated using digital signal processing techniques require a long calculation time.
With the known methods lower cost and higher processing speed cannot be achieved at the same time.